#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

int my_atoi(const char* str)
{
	assert(str);
	int flag = 1;
	while(*str == ' ');
	{
		str++;
	}
	if (*str == '-')
	{
		flag = -1;
	}
	while (*str != '\0')
	{
		if (*str >= 65)
		{
			return 0;
		}
		str++;
	}
}

int main()
{
	char arr1[20] = "     1234456";
	char arr2[20] = "1bddef123";
	char arr3[20] = "dfr";
	int num1 = my_atoi(arr1);
	int num2 = my_atoi(arr2);
	int num3 = my_atoi(arr3);
	printf("%d %d %d\n", num1, num2, num3);
	return 0;
}


//int main()
//{
//	char arr[20] = "23";
//	printf("%d\n", (*arr) - 48);
//	return 0;
//}